//
// Created by 抑~风 on 2022/12/9.
//

#include<iostream>
#include<fstream>
#include"../regexp.h"
#include"semantic_analysis.h"
using namespace std;
using namespace CWJ;
using namespace CWJ::SEMA_ANALYSIS;

string readScript5(string path){
    ifstream in (path);
    string buf ,res;
    while(in>>buf)  res += " ",res += buf;
    return res;
}

int main(){
    cout<<"SemanticAnalysis"<<endl;

    CWJCompiler com;
    auto tree = com.compile(readScript5("execTest.txt"));
    cout<<"---------------- execute -----------------"<<endl;
    com.execute(tree);

}